import { AiSample } from "@/types";
import { ReqImage, ResImage, ResImageCheck } from "@/types/aiImage";
import { getxcxjssdk } from '@/api'
import { observable, action, makeObservable } from "mobx";
import { CollPromiseObj, createPromiseObj } from "@/utils/async";
import wxSdk from '@/utils/weixin'
import { wxParamType } from "@/types/wx";


class LoginInfo {
   /**参数 */
   @observable wexParam: wxParamType = {
      appId: "",
      timestamp: 0,
      nonceStr: 0,
      signature: "",
      ticket: ""
   }


   constructor() {
      makeObservable(this)
   }
   @action async getjssdk() {
      if (typeof window == 'undefined') {
         return
      } 
      // // 获取左上部分 
      // if (this.wexParam.appId == '') {
      //    const res = await getxcxjssdk()
      //    if (res.code) {
      //       this.wexParam = res.data;
      //    }
      //    wxSdk.initWxConfig(this.wexParam) 
      // }

      return this.wexParam;
   }

   @action getWexParam() {
      // 获取左上部分 

      return this.wexParam;
   }



}
export default LoginInfo;